package cn.haohaowo.service;

import cn.haohaowo.dao.AccountDao;
import cn.haohaowo.entity.Account;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by luwancai on 18/5/19.
 * DESC:
 */
@Service
public class AccountService {

    @Autowired
    private AccountDao accountDao;

    public Account queryAccountById(int accountId) {
        return accountDao.getAccountById(accountId);
    }

    public Account queryAccount(String userName, String password) {
        return accountDao.queryAccount(userName, password);
    }

    public int saveAccount(Account account) {
        return accountDao.insertAccount(account);
    }

    public int modifyAccount(Account account) {
        return accountDao.updateAccount(account);
    }

}
